const request =  (URL,tokenT,POST,data,) => {
	if(POST==''){
		POST='GET'
	}
	return uni.request({
		
		// header['content-type']:'application/x-www-form-urlencoded'
		 header:{
			'content-type':'application/x-www-form-urlencoded',
			access_token:tokenT
		 },
		url:"http://192.168.1.10:8080/portalAdmin/web"+URL,
		data:data,
		method:POST,
		timeout:'2000',
	}).then(res=>{
		return res[1]
	})
}; 

const toast=(e)=>{
	return uni.showToast({
		title:e,
		icon:'none'
	}).then(res=>{
		return res
	})
}
let showLoading = (title = '加载中') => {
	uni.showLoading({
		title,
		mask: true
	});
}
export default {
	request,
	toast,
	showLoading
}